using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using BUS;
using Utility;
using System.IO;


public partial class KhachHang_HetHan : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }
    private void LoadData()
    {
        try
        {
            int iD = int.Parse(Request.QueryString["iD"].ToString());
            tbSanPham sanpham = tbSanPhamBUS.GetByID(iD);
            sanpham.MaSP = iD;
            sanpham.TinhTrang = 3;
            tbSanPhamBUS.Update(sanpham);
        }
        catch
        {
            Response.Redirect("~/KhachHang/SanPham.aspx");
        }
    }
}
